import request from '@/utils/request'
export default {
  //查询章节和小节信息根据课程id
  getAllChapter(courseId){
    return request({
      url: `/eduservice/chapter/getChapterVideo/${courseId}`,
      method: 'get'
    })
  },

  addChapterData(eduChapter) {
    return request({
      url: `/eduservice/chapter/addChapteradd`,
      method: 'post',
      data: eduChapter
    })
  },

  getInfo(chaptedId){
    return request({
      url: `eduservice/chapter/getInfo/${chaptedId}`,
      method: 'get'
    })
  },

  updateChapter(eduChapter){
    return request({
      url:`/eduservice/chapter/updatechapter`,
      method: 'post',
      data: eduChapter
    })
  },

  delChapter(chapterId){
    return request({
      url:`/eduservice/chapter/delchapter/${chapterId}`,
      method:'delete',
    })
  }
}
